public class MyPow {

    public static void main(String[] args) {
        MyPow myPow = new MyPow();
        System.out.println(myPow.myPow(2, -2147483648));
    }

    public double myPow(double x, int n) {
        long N = n;
        return n < 0 ? 1 / process(x, -N) : process(x, N);
    }

    public double process(double x, long n) {
        if (n == 0) return 1;
        double temp = process(x, n / 2);
        double ans = temp * temp;
        if (n % 2 == 1) {
            ans *= x;
        }
        return ans;
    }
}
